// BFC清浮动
.clearfix {
    &:after {
        content: "";
        display: block;
        clear: both;
        width: 0;
        height: 0;
        overflow: hidden;
    }
    &:before {
        content: "";
        display: block;
        clear: both;
        width: 0;
        height: 0;
        overflow: hidden;
    }
}

// 滚动条样式
* {
    &::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }
    &::-webkit-scrollbar-thumb {
        background-color: rgba(180,180,180,0.2);
        border-radius: 12px;
        background-clip: padding-box;
        border: 1px solid rgba(180,180,180,0.4);
        min-height: 28px;
    }
    &::-webkit-scrollbar-track-piece {
        background-color: rgba(180,180,180,0.06);
        border-radius: 3px;
    }
}

// 上传文件按钮组件样式
.file-module {
    display: inline-block;
    position: relative;
    width: 100px;
    height: 30px;
    overflow: hidden;
    border-radius: 2px;
    vertical-align: middle;
    cursor: pointer;

    & input[type='file'] {
        position: absolute;
        right: 0;
        top: 0;
        font-size: 100px;
        opacity: 0;
        filter: alpha(opacity=0);
        cursor: pointer;
        outline: none;
    }

    & .btn-file {
        width: 100%;
        height: 100%;
        background: #26baee;
    }
}

// CSS3的容器垂直水平居中
.box-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

// 提示模态框样式
.loading {
    padding: 12px 20px;
    font-size: 14px;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(0,0,0,.3);
    z-index: 10000;
}

// 模拟下拉选择框的样式
.select-model {
    position: absolute;
    height: 90px;
    font-size: 14px;
    border: 1px solid #bbb;
    background: #fff;
    box-sizing: border-box;
    z-index: 9999;
    overflow-y: scroll;

    & ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    & li {
        padding-left: 6px;
        height: 30px;
        line-height: 30px;
        cursor: pointer;

        &:hover {
            background: #eee;
        }

        &:nth-child(1) {
            color: #bbb;
        }
    }
}

// 模态弹窗的样式
.modal {
    font-size: 14px;
    border: 1px solid #bbb;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,.6);

    & .modal-head {
        position: relative;
        background: #eee;

        & .modal-title {
            margin: 0;
            padding: 10px 16px;
            font-size: 16px;
            font-weight: 300;
        }
        & .icon-close {
            position: absolute;
            right: 4px;
            margin-right: 0;
            font-size: 18px;
            color: #000;
        }
    }

    & .modal-body {
        padding: 10px;
        max-width: 500px;

        & p {
            margin: 0;
            padding: 0;
            line-height: 20px;
        }
    }

    & .modal-foot {
        padding: 0 10px 10px 10px;
    }
}

// 面板的基本样式
.panel {
    width: 400px;
    border: 1px solid #bbb;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,.6);
    overflow: hidden;

    & .panel-head {
        background: #eee;

        & .panel-title {
            margin: 0;
            padding: 10px 12px;
            font-size: 16px;
            font-weight: 300;
        }

        & .icon-close {
            position: absolute;
            right: 0;
            color: #000;
        }
    }

    & .panel-body {}
}

// 遮罩层样式
.shade {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}

// 文本居中
.text-center {
    text-align: center;
}

// 错误信息样式
.text-message {
    margin-top: 20px;
    font-size: 14px;
    color: #fd0054;
    text-align: center;
}

// 按钮基本样式
.btn {
    padding: 0 20px;
    height: 30px;
    font-size: 14px;
    color: #fff;
    border: none;
    border-radius: 2px;
    background: #21e6c1;
    vertical-align: middle;
    outline: none;
    cursor: pointer;

    & + .btn {
        margin-left: 10px;
    }

    &-default {
        height: 40px;
        line-height: 40px;
        color: #000;
        border: 1px solid #bbb;
        background: #fff;

        &:hover {
            border-color: #94d2e6;
        }
    }
}

// 图片按钮样式
.btn-img {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 0;
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    vertical-align: middle;

    &-start {
        background: url(../images/icon-uploader.png) no-repeat;
    }

    &-del {
        background: url(../images/icon-uploader.png) no-repeat -60px;
    }

    &-stop {
        background: url(../images/icon-uploader.png) no-repeat -20px;
    }

    &-reset {
        background: url(../images/icon-uploader.png) no-repeat -40px;
    }

    &-download {
        background: url(../images/icon-uploader.png) no-repeat -80px;
    }
}

// 图片按钮样式 end

/********************基础样式 end ***********************/
html, body {
    min-width: 800px;
    height: 100%;
    overflow-y: hidden;
}

// 面包屑目录导航的样式
#nav {
    position: relative;
    padding: 4px 0;
    height: 40px;
    color: #888;
    background: #eee;

    & ul {
        margin: 0;
        padding-left: 0;
        list-style: none;
    }

    & .nav-item {
        position: relative;
        padding: 0 12px;
        float: left;
        height: 40px;
        line-height: 40px;
        cursor: pointer;

        &:hover {
            color: #4a4a48;
        }

        & + .nav-item {
            &:before {
                content: "/";
                display: inline-block;
                position: absolute;
                left: 0;
                width: 1px;
                height: 10px;
            }
        }
    }

    & .btn-reset {
        position: absolute;
        top: 4px;
        right: 20px;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 6px;
        background: #45b7b8;
        outline: none;
        cursor: pointer;

        &:hover {
            background: #5FA9ba;
        }

        &:after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url(../images/icon-reset.png) no-repeat center center;
            background-size: 70% 70%;
        }
    }
}

// 创建和上传文件的操作样式
.tools {
    margin-top: 10px;
    padding: 6px 20px;
    background: #eee;

    & .tools-btns {
        float: left;
    }

    & .load {
        display: none;
        margin-left: 20px;
        float: left;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
        color: #999;
    }
}

// 文件列表样式的头部栏目
#file-head {
    padding-left: 10px;
    padding-right: 20px;
    height: 26px;
    line-height: 26px;
    font-size: 12px;
    background: #fff;
    border-bottom: 1px solid #e3e3e3;
    box-shadow: 1px 2px 15px #dde;
    z-index: 999;

    & > div {
        float: left;
        box-sizing: border-box;
    }

    & .resize {
        position: relative;
        margin-left: -10px;
        width: 20px;
        height: 26px;
        cursor: col-resize;
    }

    & .file-name {
        padding-left: 20px;
        width: calc(80% - 330px);
        min-width: 180px;
        border-right: 1px solid #eee;
    }

    & .file-type {
        margin-left: -10px;
        padding-left: 10px;
        min-width: 80px;
        width: 90px;
        border-right: 1px solid #eee;
    }

    & .file-size {
        margin-left: -10px;
        padding-right: 10px;
        min-width: 70px;
        width: 80px;
        text-align: right;
        border-right: 1px solid #eee;
    }

    & .file-time {
        margin-left: -10px;
        padding-left: 10px;
        min-width: 150px;
        width: 160px;
        border-right: 1px solid #eee;
    }
}

// 文件列表的样式
.file-main {
    position: absolute;
    top: 146px;
    bottom: 10px;
    left: 0;
    right: 0;
    min-width: 800px;
    background: #fff;
    overflow-y: auto;
}

.file-content {
    padding: 10px 20px 40px 10px;
    height: 100%;
    box-sizing: border-box;
}


// 文件列表样式
.file-list-list {
    & .file-item {
        width: 80%;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        box-sizing: border-box;
        overflow: hidden;

        & > div {
            float: left;
            height: 28px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            cursor: default;
            box-sizing: border-box;
        }

        &:nth-child(2n-1) {
            & > div {
                background: #fffbf1;
            }
        }
        &:hover {
            background: #cce8ff;
            & > div {
                background: #cce8ff;
            }
        }
    }
    & .file-name {
        padding-left: 20px;
        width: calc(100% - 330px);
        min-width: 180px;

        & span {
            cursor: text;
        }
    }
    & .textarea {
        display: inline-block;
        width: calc(100% - 30px);
        height: 26px;
        border: 1px solid #0C81F2;
        vertical-align: middle;
        overflow: hidden;
        box-sizing: border-box;

        & textarea {
            padding: 0;
            width: 100%;
            height: 26px;
            line-height: 26px;
            white-space: nowrap;
            outline: none;
            border: none;
            resize: none;

            /* 设置滚动条的样式 */
            &::-webkit-scrollbar {
                height: 0px;
            }
        }
    }
    & .file-type {
        padding-left: 10px;
        min-width: 80px;
        width: 90px;
    }
    & .file-size {
        padding-right: 10px;
        min-width: 70px;
        width: 80px;
        text-align: right;
    }
    & .file-time {
        padding-left: 10px;
        min-width: 150px;
        width: 160px;
    }
    & .file-select {}
}
// 文件图标样式
.file-list-icon {}

// 文件底部的统计样式
.file-foot {
    position: fixed;
    left: 20px;
    bottom: 16px;
    padding: 0 20px;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    color: #bbb;
    border-radius: 6px;
    background: rgba(255,255,255,.9);

    & span {
        &:after {
            content: "";
            display: inline-block;
            position: relative;
            top: 3px;
            left: 2px;
            width: 3px;
            height: 14px;
            background: #eee;
        }
        &:before {
            content: "";
            display: inline-block;
            position: relative;
            top: 3px;
            left: -2px;
            width: 3px;
            height: 14px;
            background: #eee;
        }
    }
}

// 菜单栏样式
.menu-list {
    display: none;
    position: absolute;
    top: 100px;
    left: 200px;
    padding: 8px 0;
    list-style: none;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    background: #fff;

    &-item {
        padding: 0 16px 0 20px;
        height: 24px;
        line-height: 24px;
        color: #222;
        cursor: pointer;
        vertical-align: middle;
        &:hover {
            background: #cce8ff;
        }
    }

    & .font-icon {
        display: inline-block;
        margin-right: 10px;
        width: 16px;
        height: 16px;
        background-image: url(../images/menu_icon.png);
        background-repeat:  no-repeat;
        vertical-align: middle;
    }
}

.icon {
    &-refresh {
        background-position: 0 -32px;
    }
    &-open {
        background-position: 0 -48px;
    }
    &-download {
        background-position: 0 0;
    }
    &-upload {
        background-position: 0 -16px;
    }
    &-create-dir {
        background-position: 0 -64px;
    }
    &-create-file {
        background-position: 0 -80px;
    }
    &-copy {
        background-position: 0 -112px;
    }
    &-cute {
        background-position: 0 -128px;
    }
    &-paste {
        background-position: 0 -144px;
    }
    &-remove {
        background-position: 0 -96px;
    }
    &-rename {
        background-position: 0 -160px;
    }
}

// 编辑器的样式
.editor-box {
    position: relative;
    margin: 40px auto 0;
    width: 80%;
    height: 80%;
    z-index: 9998;
    background: #221;

    & .head {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 30px;
        line-height: 30px;
        color: #eee;
        vertical-align: middle;

        & .head-title {
            margin: 0;
            padding-left: 20px;
            float: left;
            color: #eee;
            font-size: 16px;
            font-weight: 300;
        }

        & .head-btn {
            float: right;
            height: 30px;
        }

        & .icon {
            width: 30px;
            height: 30px;
            line-height: 30px;
        }
    }

    & .con {
        position: absolute;
        top: 30px;
        left: 0;
        bottom: 0;
        right: 0;
        padding-bottom: 10px;
        background: #bbb;
    }

    & iframe {
        width: 100%;
        height: 100%;
        border: none;
    }
}

// 编辑器全屏样式
.editor-full {
    margin: 0;
    width: 100%;
    height: 100%;
}

// 创建文件(夹)面板的样式
#create_file {

    // 文件(夹)切换
    & .type-head {
        height: 30px;
        line-height: 30px;

        & .type-title {
            margin: 0;
            float: left;
            width: 100px;
            text-align: right;
        }

        & .type-con {
            padding-left: 20px;
            float: left;
            width: 300px;
            height: 30px;
            line-height: 30px;
            box-sizing: border-box;
        }

        & .type-radio {
            display: inline-block;
            position: relative;
            top: -5px;
            font-size: 0;
            height: 20px;
            line-height: 20px;
            cursor: pointer;

            & span {
                font-size: 14px;
                vertical-align: middle;
            }
        }

        & .icon {
            margin-right: 2px;
        }

        & .icon-radio {
            background: url(../images/icon-radio.png) no-repeat -20px;
        }
    }

    & .file-con {
        margin-top: 20px;
        font-size: 0;

        & .file-group {
            position: relative;
            height: 30px;
            line-height: 30px;

            & + .file-group {
                margin-top: 20px;
            }
        }

        & .group-title {
            display: inline-block;
            padding-right: 10px;
            width: 100px;
            font-size: 14px;
            text-align: right;
            box-sizing: border-box;
        }

        & .group-input {
            padding-left: 6px;
            width: 230px;
            height: 30px;
            line-height: 30px;
            font-size: 14px;
            border: 1px solid #bbb;
            outline: none;
            box-sizing: border-box;
        }
    }

    // 下拉选择框的三角形
    & .icon-select {
        position: relative;
        right: 26px;
        top: -8px;
        background: url(../images/icon-select.png) no-repeat;
        background-size: 100% 100%;
        transition: all 0.2s;
    }

    // 下拉选择框获取焦点的样式
    & .file-select-focus {

        & .group-input {
            border-color: #7dd8c7;
        }

        & .icon-select {
            top: -4px;
            transform-origin: center;
            transform: rotate(180deg);
        }
    }

    // 文件激活
    & .file-active {
        & .type-radio {
            &:nth-child(1) {
                & .icon-radio {
                    background: url(../images/icon-radio.png) no-repeat;
                }
            }
        }

        & .dir-import {
            display: none;
        }
    }

    // 文件夹激活
    & .dir-active {
        & .type-radio {
            &:nth-child(2) {
                & .icon-radio {
                    background: url(../images/icon-radio.png) no-repeat;
                }
            }
        }
        & .file-import {
            display: none;
        }
    }
}

// 上传文件面板的样式
#uploader {
    & .panel {
        width: 80%;
        min-width: 600px;
    }

    & .btn-group {
        margin-top: 20px;
        padding-left: 20px;
    }

    & .btn-select {
        display: inline-block;
        height: 38px;
        vertical-align: middle;
    }

    & .btn-default {
        height: 38px;
        line-height: 38px;
    }

    & .con {
        margin: 20px 0;
        padding-bottom: 20px;
        height: 200px;
        overflow-y: scroll;
    }

    & .uploading-list {
        margin: 0 auto;
        width: 90%;
        border-collapse: collapse;
        border-spacing: 0;
        table-layout: fixed;

        & th, td {
            height: 30px;
            line-height: 30px;
            font-size: 14px;
            font-weight: 300;
            border: 1px solid #bbb;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        & .file-name {
            padding: 0 6px;
            overflow: hidden;
        }
        & .file-size {
            width: 60px;
            text-align: center;
        }
        & .file-status {
            width: 220px;
        }
        & .file-operation {
            width: 100px;
            font-size: 0;

            & .btn-img-stop {
                display: none;
            }

            & .btn-img-reset {
                display: none;
            }
        }

        & .file-operation-stop {
            & .btn-img-start {
                display: none;
            }
            & .btn-img-stop {
                display: inline-block;
            }
        }

        & .file-operation-error {
            & .btn-img-reset {
                display: inline-block;
            }

            & .btn-img-start {
                display: none;
            }
        }

        & .btn-img {
            margin-left: 4px;
        }
    }
}

// 进度条
.rate-module {
    text-align: center;
    & .rate-bj {
        display: inline-block;
        position: relative;
        width: 90%;
        height: 14px;
        line-height: 14px;
        font-size: 12px;
        box-shadow: 0 0 1px #bbb;
        background: rgba(0,0,0, .1);
        border-radius: 10px;
        overflow: hidden;
        box-sizing: border-box;
        vertical-align: middle;
    }

    & .rate-text {
        display: block;
        position: relative;
        transform: scale(.8);
        font-weight: 400;
        color: #fff;
        z-index: 999;
    }

    & .rate {
        display: inline-block;
        position: absolute;
        top: 0;
        left: 0;
        width: 50%;
        height: 100%;
        background: #1a1;
    }
}

// 重命名文件(夹)面板的样式
#rename {

    & .panel {
        height: 240px;
    }

    & .file-name {
        margin: 0;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }

    & .file-rename {
        padding-left: 6px;
        width: 80%;
        height: 30px;
        line-height: 30px;
        border: 1px solid #bbb;
        outline: none;
    }

    & .btn {
        margin-top: 20px;
    }
}